<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
   
</head>
<body>
    <div id = "app">
        <div>{{coun}}</div>
        <div>{{coun}}</div>
        <div>{{coun}}</div>
        <h1>{{name}}</h1>
        <div>{{name.length}}</div>
        <div>{{name.toUpperCase()}}</div>
        
        <div>年龄：{{age}}</div>
        <button v-on:click="test1">点我每次给年龄+1</button>
        <button v-on:click="test2">点我每次给年龄+10</button>
        <button v-on:click="test3">点我每次给年龄+1，同时给name+“你好”</button>
    </div>
</body>
</html>
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<script>
    let vue = new Vue({
        el:"#app",
        data:{
            name:"hhujkHJO",
            coun:"1",
            age:0
        },
        methods:{
            test1:function() {
                this.age++;
            },
            test2:function() {
                this.age += 10;
            },
            test3:function() {
                this.age++;
                this.name += "你好";
            }

        }
    }) ;
    console.log(vue)
</script>